<template tag="以下文档内容为hycli自动生成">
  <div style="height: 100%">
    <div style="margin:0.8rem;"><h5 style="display:inline">研发概况</h5><span style="margin-left: 0.5rem; color:#999"> 任务分配和迭代上线情况</span>
        <ddmenu :menuList="lob_idList" @valueChanged="onlob_idChange" v-model="form_aabcv.lob_id" menuType="my_business_line" ></ddmenu>
    </div>
    <hr style="margin-top:0;color:#999"/>
<div class="query">
    
    <el-form :model="form_aabcv" inline >
        <!-- 日期控件个数： 0 -->
        <!-- 控件个数：[] -->

        <span class="ddl">
        </span>
        

        <!-- xtabs -->
        

    </el-form>
</div>
<div class="listbar">
  <el-row>
      <!-- lstat lstat -URL-->
    <el-col :span="24">
      <el-row>
    <el-col :span="2" style="font-size: 0.9rem;font-weight:600;margin-bottom: 16px;">
      上月任务概况
    </el-col>
    <el-col :span="4" style="margin-bottom: 16px;">
      <el-statistic title="总数" :value="stat_aabcw.total" />
    </el-col>
    
    <el-col :span="4" style="margin-bottom: 16px;">
      <el-statistic title="待评审" :value="stat_aabcw.wait_tch_sol_ass" />
    </el-col>
    
    <el-col :span="4" style="margin-bottom: 16px;">
      <el-statistic title="研发中" :value="stat_aabcw.developing" />
    </el-col>
    
    <el-col :span="4" style="margin-bottom: 16px;">
      <el-statistic title="测试中" :value="stat_aabcw.testing" />
    </el-col>
    
    <el-col :span="4" style="margin-bottom: 16px;">
      <el-statistic title="已上线" :value="stat_aabcw.finish" />
    </el-col>
      
  </el-row>
  </el-col>
      <!-- lstat lstat -URL-->
    <el-col :span="24">
      <el-row>
    <el-col :span="2" style="font-size: 0.9rem;font-weight:600;margin-bottom: 16px;">
      本月任务概况
    </el-col>
    <el-col :span="4" style="margin-bottom: 16px;">
      <el-statistic title="总数" :value="stat_aabcx.total" />
    </el-col>
    
    <el-col :span="4" style="margin-bottom: 16px;">
      <el-statistic title="待评审" :value="stat_aabcx.wait_tch_sol_ass" />
    </el-col>
    
    <el-col :span="4" style="margin-bottom: 16px;">
      <el-statistic title="研发中" :value="stat_aabcx.developing" />
    </el-col>
    
    <el-col :span="4" style="margin-bottom: 16px;">
      <el-statistic title="测试中" :value="stat_aabcx.testing" />
    </el-col>
    
    <el-col :span="4" style="margin-bottom: 16px;">
      <el-statistic title="已上线" :value="stat_aabcx.finish" />
    </el-col>
      
  </el-row>
  </el-col>
    <!-- ChartOpts PIE -CMPNT-->
  <el-col :span='12'>
    <aabcy ref="chart_aabcy" height='300px' title="在研占比"
      unq="aabcy" url="/ws/dev/plan/staff1mx" type="PIE" stack=''
      rType='radius' margin='32px 0px 16px 0px'
      showLabel='false' theme=''></aabcy>
  </el-col>
    <!-- tskbar TSKBAR -CMPNT-->
    <el-col :span='12'>
      <aabda ref="ext_aabda" height='300px' title="近期上线"
        unq="aabda" count='4' url="/ws/dev/plan/fnstsk" rows='1'  margin='8px 0px 16px 0px'
        ></aabda>
    </el-col>
    <!-- tskbar TSKBAR -CMPNT-->
    <el-col :span='12'>
      <aabdb ref="ext_aabdb" height='300px' title="近期开发任务"
        unq="aabdb" count='4' url="/ws/dev/plan/recentdevtasks" rows='1'  margin='8px 0px 16px 0px'
        ></aabdb>
    </el-col>
    <!-- tskbar TSKBAR -CMPNT-->
    <el-col :span='12'>
      <aabdc ref="ext_aabdc" height='300px' title="近期测试任务"
        unq="aabdc" count='4' url="/ws/dev/plan/recenttesttasks" rows='1'  margin='8px 0px 16px 0px'
        ></aabdc>
    </el-col>
    <!-- ChartOpts BAR -CMPNT-->
  <el-col :span='24'>
    <aabcz ref="chart_aabcz" height='240px' title="任务情况"
      unq="aabcz" url="/ws/dev/plan/staff1mx" type="BAR" stack=''
      rType='' margin='32px 0px 16px 0px'
      showLabel='false' theme=''></aabcz>
  </el-col>
     <!-- img IMG -CMPNT-->
    <el-col :span='12'>
      <aabdd ref="ext_aabdd" height='auto' type="IMG"
        unq="aabdd" count='10' url="/imgs/prod.jpg" rows='1'  margin='8px 0px 16px 0px'
        ></aabdd>
    </el-col>
     <!-- img IMG -CMPNT-->
    <el-col :span='12'>
      <aabde ref="ext_aabde" height='auto' type="IMG"
        unq="aabde" count='10' url="/imgs/dev.jpg" rows='1'  margin='8px 0px 16px 0px'
        ></aabde>
    </el-col>
     <!-- img IMG -CMPNT-->
    <el-col :span='24'>
      <aabdf ref="ext_aabdf" height='auto' type="IMG"
        unq="aabdf" count='10' url="/imgs/flow.png" rows='1'  margin='8px 0px 16px 0px'
        ></aabdf>
    </el-col>
</el-row>
</div>
<div>
</div>
  </div>
</template>
<script>
// 在研占比
import aabcy from "@/views/cmpnts/chart.base.vue"
// 近期上线
import aabda from "@/views/cmpnts/task.bar.vue"
// 近期开发任务
import aabdb from "@/views/cmpnts/task.bar.vue"
// 近期测试任务
import aabdc from "@/views/cmpnts/task.bar.vue"
// 任务情况
import aabcz from "@/views/cmpnts/chart.base.vue"
// 产品流程
import aabdd from "@/views/cmpnts/xbar.vue"
// 研发流程
import aabde from "@/views/cmpnts/xbar.vue"
// 项目流程
import aabdf from "@/views/cmpnts/xbar.vue"
// 业务线
import ddmenu from "@/views/cmpnts/ddMenu.vue"



export default {
components: {
    aabcy,
    aabda,
    aabdb,
    aabdc,
    aabcz,
    aabdd,
    aabde,
    aabdf,
     ddmenu,
},
data() {
  return {
    shortcuts: this.$js.page.latestDays(),
    cmpnt_funcs:{},
    conf: {
      loading: false,
      progressColor: this.$theia.env.conf.progress || []
    },
    ganttIdx: -1,
        form_aabcv: {
            pi: 1,
            ps: 15,
            disabled:false,
            single_date_range_name:"",
            single_date_range_value:[],
            single_text_name:"",
            single_text_value:"",
            lob_id:"",
            },
            lob_idList:[],
            dataList_aabcv:[],
            multiQueryDateRange:[],
            multiQueryText:[],
            total_aabcv:0,
            note_dataList:[],
stat_aabcw:{
    total:0,
    wait_tch_sol_ass:0,
    developing:0,
    testing:0,
    finish:0,
},
stat_aabcx:{
    total:0,
    wait_tch_sol_ass:0,
    developing:0,
    testing:0,
    finish:0,
},
};
  },
mounted() {
  this.loadEnums_aabcv()
  this.form_aabcv.lob_id = this.$theia.user.get("lob_id")
  this.form_aabcv.single_date_range_name = (this.multiQueryDateRange[0]||{}).value
  this.form_aabcv.single_text_name = (this.multiQueryText[0]||{}).value
  this.cmpnt_funcs["aabcy"] = this.show_cmpnt_aabcy
  this.cmpnt_funcs["aabda"] = this.show_cmpnt_aabda
  this.cmpnt_funcs["aabdb"] = this.show_cmpnt_aabdb
  this.cmpnt_funcs["aabdc"] = this.show_cmpnt_aabdc
  this.cmpnt_funcs["aabcz"] = this.show_cmpnt_aabcz
  this.cmpnt_funcs["aabdd"] = this.show_cmpnt_aabdd
  this.cmpnt_funcs["aabde"] = this.show_cmpnt_aabde
  this.cmpnt_funcs["aabdf"] = this.show_cmpnt_aabdf

  this.form_aabcv = Object.assign(this.form_aabcv,this.$route.params)
  this.queryData_aabcv ()
    },
methods: {
  ganttChange(id) {
      this.ganttIdx = id
    },

queryData_aabcv(mform = {},nform={}){
    //构建查询参数
    let queryForm = Object.assign({},this.form_aabcv)
    queryForm = Object.assign(queryForm,nform||{})
    
    //处理多个日期选择
    queryForm[this.form_aabcv.single_date_range_name] = this.form_aabcv.single_date_range_value
    queryForm[this.form_aabcv.single_text_name] = this.form_aabcv.single_text_value
   
    //处理日期范围选择

    queryForm[this.form_aabcv.single_date_range_name] = null
    queryForm.single_date_range_value = null
    queryForm.single_date_range_name = null

    queryForm.single_text_value = null
    queryForm.single_text_name = null
 
    //处理关联表plan_report plan_report 
   
    //发送查询请求
    let that = this
    that.conf.loading = true
    //构建统计查询
      this.$theia.http.get("/ws/dev/plan/lmstat",queryForm).then(res=>{
        let item = res||{}
         that.stat_aabcw.total = item.total
         that.stat_aabcw.wait_tch_sol_ass = item.wait_tch_sol_ass
         that.stat_aabcw.developing = item.developing
         that.stat_aabcw.testing = item.testing
         that.stat_aabcw.finish = item.finish
      });
      this.$theia.http.get("/ws/dev/plan/stat",queryForm).then(res=>{
        let item = res||{}
         that.stat_aabcx.total = item.total
         that.stat_aabcx.wait_tch_sol_ass = item.wait_tch_sol_ass
         that.stat_aabcx.developing = item.developing
         that.stat_aabcx.testing = item.testing
         that.stat_aabcx.finish = item.finish
      });
  this.$refs.chart_aabcy.show(this.form_aabcv)
  this.$refs.chart_aabcz.show(this.form_aabcv)
    this.$refs.ext_aabda.show(this.form_aabcv)
    this.$refs.ext_aabdb.show(this.form_aabcv)
    this.$refs.ext_aabdc.show(this.form_aabcv)
    this.$refs.ext_aabdd.show(this.form_aabcv)
    this.$refs.ext_aabde.show(this.form_aabcv)
    this.$refs.ext_aabdf.show(this.form_aabcv)
  },

  resetItemData_aabcv(that,lst){
    lst.forEach(item => {
      item.__raw = Object.assign({}, item)
    if(item.children){
      that.resetItemData_aabcv(that,item.children)
    }
  });
  },
    loadEnums_aabcv(){
        //业务线
        this.lob_idList = this.$theia.enum.getTree("my_business_line","","" ,99)
    },

  handleSizeChange(ps){
    this.form_aabcv.ps = ps
    this.onQuery(true)
  },
  onlob_idChange(v){
    this.$theia.user.set("lob_id",v)
    this.loadEnums_aabcv()
    this.onQuery(true)
  },
  handleCurrentChange(pi){
    this.form_aabcv.pi = pi
    this.onQuery()
  },
  onQuery(refresh){
    if(refresh){
      this.form_aabcv.pi = 1
    }
    this.queryData_aabcv ()
  },
},
};
</script>
<style>
.el-dialog{
  border-radius:5px !important
}
</style>
<style scoped>
.el-form-item {
  margin-right: 10px !important;
}

.opts .el-button--small {
  margin-left: 0px;
  padding-left: 0px;
  margin-right: 4px;
}

/deep/.el-table td.el-table__cell div {
  vertical-align: middle;
}
/deep/.el-button+.el-dropdown{
  margin-left:0px;
}
/deep/.el-button+.el-button{
  margin-left:0px;
}
.el-button{
  padding-left: 6px !important;
  padding-right: 6px !important;
}
.blist {
  margin-bottom: 8px;
  width: 100%;
}

.blist .el-radio-group {
  margin-right: 8px;
}

.ddl {
  margin-bottom: 8px;
  width: 100%;

}

.ddl .el-dropdown {
  margin-right: 8px;
}

.listbar {
  margin-bottom: 8px;
  text-align: center;
}
 .el-dropdown-link {
  cursor: pointer;
  color: var(--el-color-primary);
  display: flex;
  align-items: center;
  font-size: 0.65rem;
}
/deep/.el-button--small{
  padding: 5px 4px;
}

.prepend /deep/.el-input__wrapper{
  border-top-right-radius:0;
  border-bottom-right-radius:0;
}
.prepend+/deep/.el-date-editor{
  border-top-left-radius:0;
  border-bottom-left-radius:0;
  border-left:0;
}

</style>